
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>线路定义管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/line/tLine/">线路定义列表</a></li>
		<shiro:hasPermission name="line:tLine:edit"><li><a href="${ctx}/line/tLine/form">线路定义添加</a></li></shiro:hasPermission>
	</ul>
	 <form:form id="searchForm" modelAttribute="TLine" action="${ctx}/line/tLine/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<ul class="ul-form">
			<li>
				<label>线路名称：</label>
				<form:input path="linename" maxlength="50" class="input-medium"/>
			</li>
			<li>
				<label>线路类型：</label>
				<form:select path="linetype" class="input-medium">
					<option value="">请选择</option>
					<form:options items="${fns:getDictList('line_type')}"
						itemLabel="label" itemValue="value" htmlEscape="false" />
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
			<li class="clearfix"></li>
		</ul>
	</form:form> 
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>线路名称</th>
				<th>线路类型</th>
				<th>出发地</th>
				<th>经停城市</th>
				<th>目的地</th>
				<th>天数</th>
				<th>线路状态</th>
			<shiro:hasPermission name="line:tLine:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<c:forEach items="${page.list}" var="tLine">
			<tr>
				<td>${tLine.linename}</td>
				<td>${fns:getDictLabel(tLine.linetype, 'line_type', '无')}</td>
				<td>${tLine.departcity.sitename}</td>
				<td>${tLine.stopsites}</td>
				<td>${tLine.destcity.sitename}</td>
				<td>${tLine.estdays}</td>
				<td>
					${tLine.linestatus == '0'?'有效':'' }
					${tLine.linestatus == '1'?'无效':'' }
				</td>
				<shiro:hasPermission name="line:tLine:edit"><td>
					<a href="${ctx}/line/tLine/form?lineid=${tLine.lineid}">修改</a>
					<a href="${ctx}/line/tLine/delete?lineid=${tLine.lineid}" onclick="return confirmx('确认要删除该线路定义吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>